cmake_minimum_required(VERSION 3.30)

project(QtPropertyBrowser)

# 设置 C++ 标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

find_package(Qt6 REQUIRED COMPONENTS Widgets)
qt_standard_project_setup()

include_directories(src)

macro(AddFileDirectory dir)
    file(GLOB SRC ${dir}/*.*)

    set(LOCAL_SRC_ALL ${LOCAL_SRC_ALL} ${SRC})
endmacro()

AddFileDirectory(src)


# 默认生成动态库
set(BUILD_SHARED_LIBS ON)
add_library(QtPropertyBrowser SHARED ${LOCAL_SRC_ALL})
target_link_libraries(QtPropertyBrowser PRIVATE Qt6::Widgets)
